/*
 * Copyright 2018 The JA-SIG Collaborative. All rights reserved.
 * distributed with thi file and available online at
 */
package com.lap.codegen.utils;

/**
 * @author 劳水生
 * @version 1.0.0
 */
public class CodeEnum {
	/**
	 * 是否
	 * 
	 * @author lao
	 */
	public enum YN {
		/**
		 * 是
		 */
		YES("YES"),
		/**
		 * 否
		 */
		NO("NO");

		private final String value;

		public String getValue() {
			return value;
		}

		YN(String value) {
			this.value = value;
		}

		/**
		 * 获取啥
		 * 
		 * @param value
		 * @return
		 */
		public static String getValue(String value) {
			if (YES.getValue().equals(value)) {
				return "否";
			} else if (NO.getValue().equals(value)) {
				return "是";
			} else {
				return "";
			}
		}
	}

	/**
	 * 数据类型
	 * 
	 * @author lao
	 *
	 */
	public enum JavaType {
		/**
		 * int
		 */
		INT("Integer"),
		/**
		 * Date
		 */
		DATE("Date"),
		/**
		 * Long
		 */
		LONG("Long"),
		/**
		 * Double
		 */
		DOUBLE("Double"),
		/**
		 * String
		 */
		STRING("String");

		private final String value;

		public String getValue() {
			return value;
		}

		JavaType(String value) {
			this.value = value;
		}
	}

}
